package com.hmdp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * PO实体类 - 秒杀优惠券
 */
@ApiModel("秒杀优惠券 Bean")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_seckill_voucher")
public class SeckillVoucher implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "关联的优惠券的id")
    @TableId(value = "voucher_id", type = IdType.INPUT)
    private Long voucherId;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "生效时间")
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "失效时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

}
